package algotrader.fakeserver;

import java.util.ArrayList;
import java.util.List;

import quickfix.fix42.MarketDataRequest;
import quickfix.fix42.NewOrderSingle;
import quickfix.fix42.OrderCancelReplaceRequest;
import quickfix.fix42.OrderCancelRequest;

public class FakeServerObserver {
	
	private List<MarketDataRequest> datas = new ArrayList<MarketDataRequest>();
	private List<NewOrderSingle> orders = new ArrayList<NewOrderSingle>();
	private List<OrderCancelRequest> cancels = new ArrayList<OrderCancelRequest>();
	private List<OrderCancelReplaceRequest> cancelReplaces = new ArrayList<OrderCancelReplaceRequest>();
	
	public void receiveMarketDataRequest(MarketDataRequest data) {
		datas.add(data);
	}
	
	public List<MarketDataRequest> getDataRequests() {
		return this.datas;
	}
	
	public void receiveNewOrderSingle(NewOrderSingle order) {
		orders.add(order);
	}
	
	public List<NewOrderSingle> getNewOrdersSingle() {
		return this.orders;
	}
	
	public void receiveOrderCancelRequest(OrderCancelRequest r) {
		cancels.add(r);
	}

	public List<OrderCancelRequest> getOrderCancelRequests() {
		return cancels;
	}
	
	public void receiveOrderCancelReplaceRequest(OrderCancelReplaceRequest r) {
		cancelReplaces.add(r);
	}

	public List<OrderCancelReplaceRequest> getOrderCancelReplaceRequests() {
		return this.cancelReplaces;
	}
	
}
